﻿(function (wtm) {
    wtm.hidden_Render = function (para) {
        var $el = $('#' + para.id);
        var $form = $el.closest('form');

        if (para.value.length > 0) {
            $el.val(para.value[0]);

            for (var i = 1; i < para.value.length; i++) {
                $form.append('<input wtm-field type="hidden" name="' + para.fieldName + '" value="' + para.value[i] + '"/>');
            }
        }
    };
})(wtm);